cmake_minimum_required(VERSION 3.0.2)
project(obeject_detect)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
        roscpp
        rospy
        std_msgs
        pcl_ros
        cv_bridge
        )

find_package(OpenCV 3 REQUIRED)
find_package(Eigen3 REQUIRED)
catkin_package(
        #  INCLUDE_DIRS include
        #  LIBRARIES obeject_detect
        #  CATKIN_DEPENDS roscpp rpspy std_msgs
        #  DEPENDS system_lib
)

###########
## Build ##
###########
set(THIRD_PARTY_LIBS
        ${Sophus_LIBRARIES}
        ${Pangolin_LIBRARIES} GL GLU GLEW glut
        ${GTEST_BOTH_LIBRARIES}
        ${GLOG_LIBRARIES}
        ${GFLAGS_LIBRARIES}
        pthread
        ${CSPARSE_LIBRARY}
        ${catkin_LIBRARIES}
        ${OpenCV_LIBRARIES}
        ${PCL_LIBRARIES}
        )
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
        include ${catkin_INCLUDE_DIRS}
        ${catkin_INCLUDE_DIRS}
)

add_executable(object_detect_pcl
        src/object_detect_in_pcl.cpp)
target_link_libraries(object_detect_pcl
        ${THIRD_PARTY_LIBS}
        )

add_executable(calDep
        src/calcDepth.cpp)
target_link_libraries(calDep
        ${THIRD_PARTY_LIBS}
        )

add_executable(findPossible
        src/findPossible.cpp)
target_link_libraries(findPossible
        ${THIRD_PARTY_LIBS}
        )


add_executable(findPossible_D435
        src/findPossible_D435.cpp)
target_link_libraries(findPossible_D435
        ${THIRD_PARTY_LIBS}
        )

